import {request,uploadRequest} from '../http.js'

// 课程分类
export const classify = (data)=>{
	return request({
		url:'/api/xiluedu.course_category/children',
		method:'POST',
		data
	})
}
// 课程列表
export const lists = (data)=>{
	return request({
		url:'/api/xiluedu.course/lists',
		method:'POST',
		data
	})
}
// 课程详情
export const courseDetail = (data)=>{
	return request({
		url:'/api/xiluedu.course/detail',
		method:'POST',
		// header:{
		// 	"content-type":data.contentType
		// },
		data:data
	})
}
// 关注/取消关注老师 /api/xiluedu.course/teacher_collection
export const teacher_collection = (data)=>{
	return request({
		url:'/api/xiluedu.course/teacher_collection',
		method:'POST',
		data
	})
}
// 老师详情
export const teacher_details = (data)=>{
	return request({
		url:'/api/xiluedu.course/teacher_details',
		method:'POST',
		data
	})
}
// 确认订单
export const sureOrder = (data)=>{
	return request({
		url:'/api/xiluedu.course_order/sure',
		method:'POST',
		data
	})
}
// 创建订单及支付
export const create_order = (data)=>{
	return request({
		url:'/api/xiluedu.course_order/create_order',
		method:'POST',
		data
	})
}

// 订单支付 /api/xiluedu.pay/pay
export const payOrder = (data)=>{
	return request({
		url:'/api/xiluedu.pay/pay',
		method:'POST',
		data
	})
}


// 获取余额 api/wanlshop/pay/getBalance
export const getBalance = (data)=>{
	return request({
		url:'/api/wanlshop/pay/getBalance',
		method:'POST',
		data
	})
}

// 优惠券列表
export const coupon_lists = (data)=>{
	return request({
		url:'/api/xiluedu.user/coupon_lists',
		method:'POST',
		data
	})
}


// 学习中心 /api/xiluedu.user/study_new
export const study_new = (data)=>{
	return request({
		url:'/api/xiluedu.user/study_new',
		method:'POST',
		data
	})
}

// 线下课程列表 /api/xiluedu.offline_course/lists
export const offline_course = (data)=>{
	return request({
		url:'/api/xiluedu.offline_course/lists',
		method:'POST',
		data
	})
}
// 线下详情 /api/xiluedu.offline_course/detail
export const offline_course_detail = (data)=>{
	return request({
		url:'/api/xiluedu.offline_course/detail',
		method:'POST',
		data
	})
}

// 课程报名记录 /api/xiluedu.offline_order/lists
export const offline_order_lists = (data)=>{
	return request({
		url:'/api/xiluedu.offline_order/lists',
		method:'POST',
		data
	})
}

//线下-创建订单及支付 /api/xiluedu.offline_order/create_order
export const offline_create_order = (data)=>{
	return request({
		url:'/api/xiluedu.offline_order/create_order',
		method:'POST',
		data
	})
}

// 

// 订单列表 /api/xiluedu.course_order/lists
export const order_list = (data)=>{
	return request({
		url:'/api/xiluedu.course_order/lists',
		method:'POST',
		data
	})
}

// 线下报名详情 /api/xiluedu.offline_order/detail
export const offline_order_detail = (data)=>{
	return request({
		url:'/api/xiluedu.offline_order/detail',
		method:'POST',
		data
	})
}